package com.cby.jetpack.sample.binding

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.databinding.DataBindingUtil
import com.cby.jetpack.sample.R
import com.cby.jetpack.sample.binding.data.User
import com.cby.jetpack.sample.databinding.ActivityDataBindTestBinding

/**
 * @description: TestDataBindingActivity
 *
 * @author ChenBaoyang
 * @date 8/9/21 14:47
 */
class TestDataBindingActivity : AppCompatActivity() {

    private lateinit var binding: ActivityDataBindTestBinding

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = DataBindingUtil.setContentView(this@TestDataBindingActivity, R.layout.activity_data_bind_test)
        val user = User("jason", "cby3434")
        binding.user = user
    }
}